]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
st/theme-node-drawing: Don't skip square top left inset shadow corners
authorSebastian Keller <skeller@gnome.org>
Mon, 21 Oct 2024 19:53:14 +0000 (21:53 +0200)
committerSebastian Keller <skeller@gnome.org>
Mon, 21 Oct 2024 20:17:35 +0000 (22:17 +0200)
When the inner radius of the top left corner is 0, the corresponding arc
does not get drawn, resulting in a path going from the bottom left
corner to the top right corner when the path is closed.

Fix this by always including a line_to from the bottom left to the top
left corner.

Fixes: dde13b30c ("st/theme-node-drawing: Trace the correct path for inset box shadows")
Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7996
src/st/st-theme-node-drawing.c

index 0b2b7b5351843bff266bce91820b527b890e2a8c..395f179b60fd1fec63aaa5b1208831e7b1ce225d 100644 (file)
@@ -972,6 +972,11 @@ paint_inset_box_shadow_to_cairo_context (StThemeNode     *node,
       int inner_radius;
 
       inner_radius = MAX (0, outer_radius[ST_CORNER_TOPLEFT] - shadow_spec->spread);
+
+      cairo_line_to (temp_cr,
+                     shrunk_extents_x1,
+                     shrunk_extents_y1 + inner_radius);
+
       if (inner_radius > 0)
         {
           cairo_arc (temp_cr,